package com.wl.dzt.sys.swagger;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author wl_code@163.com
 * @date 2018/7/5/005
 * @version 1.0
 * @description 描swagger配置信息对象
 * 
 */
@Component
@ConfigurationProperties(prefix = "swagger")
@PropertySource(value = {"classpath:/my-swagger.yml"}, encoding = "UTF-8",ignoreResourceNotFound = true)
public class SwaggerInfo {

    @Value("${title}")
    private String title;
    @Value("${description}")
    private String description;
    @Value("${version}")
    private String version;
    @Value("${contact}")
    private String contact;
    @Value("${termsOfServiceUrl}")
    private String termsOfServiceUrl;
    @Value("${author}")
    private String author;
    @Value("${email}")
    private String email;
    @Value("${basePackage}")
    private String basePackage;


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getTermsOfServiceUrl() {
        return termsOfServiceUrl;
    }

    public void setTermsOfServiceUrl(String termsOfServiceUrl) {
        this.termsOfServiceUrl = termsOfServiceUrl;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getBasePackage() {
        return basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }

    @Override
    public String toString() {
        return "SwaggerInfo{" +
                "title='" + title + '\'' +
                ", description='" + description + '\'' +
                ", version='" + version + '\'' +
                ", contact='" + contact + '\'' +
                ", termsOfServiceUrl='" + termsOfServiceUrl + '\'' +
                ", author='" + author + '\'' +
                ", email='" + email + '\'' +
                ", basePackage='" + basePackage + '\'' +
                '}';
    }
}
